package com.sl.springboot.swagger.dao;

import com.sl.springboot.swagger.bean.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserDao extends JpaRepository<User, Integer> {

    @Query(value = "from User where userName=:userName")
    User findUserByName(@Param("userName") String userName);

}
